// File Name: led_interrupt.c
// Author: kukukukuku~
// Date: 2024-12-25

#include "apm32f00x_tmr1.h"
#include "./LED/inc/led_var.h"

void LED_TMR_IRQ_HANDLE(void)
{
    static uint8_t state;
    
    if(TMR1_ReadIntFlag(LED_TMR, TMR1_INT_UPDATE))
    {
        //LED闪烁
        state ? led_on() : led_off();
        state = !state;
        
        TMR1_ClearIntFlag(LED_TMR, TMR1_INT_UPDATE);
    }
}
